﻿function UpData(obj) {
    var model = {};
    model.ReNames = $("#ReNames").val();
    model.Rephone = $("#Rephone").val();
    model.province = $("#City").val();
    model.detailaddres = $("#textarea").val();
    model.defaultaddress = $("#defaultaddress").val();
    model.UserId = $("#UserId").val();
    model.ID = $("#ID").val();
    if (obj > 0) {
        DoPostAction(model, "/Receiveaddress/UpdataAddress");
    } else {
        DoPostAction(model, "/Receiveaddress/AddressData");
    }
    window.location.href = "/Receiveaddress/MyAddress";
   
}

function DelteData(obj)
{
    var model = {};
    model.ID = obj;///
    DoPostAction(model, "/Receiveaddress/DelAddress");
    window.location.href = "/Receiveaddress/MyAddress";
}
